package com.jcark.ui.dialog.style;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;

import androidx.core.content.ContextCompat;

import com.jcark.ui.R;
import com.jcark.ui.utils.ViewUtils;

/**
 * Description: 蓝色样式<br>
 * 这是一个扩展的demo
 *
 * @author King.Zi<br>
 * @date 2022/6/14<br>
 * Email: 78688689@qq.com
 */
public class BlueStyle implements IMutableDialogStyle {

    @Override
    public int getMainColor() {
        return R.color.color_blue_main;
    }

    @Override
    public int getTitleTextStyle() {
        return 0;
    }

    @Override
    public int getContentTextStyle() {
        return R.style.MutableDialog_ContentDefaultStyle_Blue;
    }

    @Override
    public int getLeftButtonTextStyle() {
        return R.style.MutableDialog_LeftButtonDefaultStyle_Blue;
    }

    @Override
    public Drawable getLeftButtonBackground(Context context) {
        return ViewUtils.getBackgroundStrokeDrawable(context, ContextCompat.getColor(context, getMainColor()), 22f);
    }

    @Override
    public int getRightButtonTextStyle() {
        return 0;
    }

    @Override
    public Drawable getRightButtonBackground(Context context) {
        return ViewUtils.getBackgroundDrawable(context, new int[]{ContextCompat.getColor(context,
                R.color.color_blue_start), ContextCompat.getColor(context, R.color.color_blue_end)},
                GradientDrawable.Orientation.LEFT_RIGHT, 22f);
    }
}
